// requireAll.js 载入所有请求模块 Load all request modules
// by Goog、2021
function requireAll() {
    // 用一个对象把所有返回对象包起来
    // Wrap all returned objects with one object
    let rqs = new Object();

    for (rq of arguments) {
        Object.defineProperty(rqs, rq, {
            value: require(rq), // Save return object
            // 如果只为false 不允许修改这个属性值 默认值也是false
            // If it is only false, it is not allowed to modify this property value. The default value is also false
            writable: true,
            // enumerable 如果值为false 则不允许遍历, 默认的值是 false
            // Enumerable if the value is false, traversal is not allowed, and the default value is false
            enumerable: true,
            // configurable 如果为false 则不允许删除这个属性 默认为false
            // Configurableif false, this attribute cannot be deleted. The default value is false
            configurable: true
        });
    }
    return rqs;
}
// console.log(requireAll('fs', 'http'));
module.exports = requireAll;